# BookManage PyCharm
# orm_单表基础查询 86155
# 2025/8/11 10:44
import os
if __name__ == '__main__':
    os.environ.setdefault("DJANGO_SETTINGS_MODULE","BookManage.settings")
    import django
    django.setup()

    from app.models import Book,Press,BookType
    # book = Book.objects.get(id=16)
    # booklist = Book.objects.filter(bookname__icontains='')
    # print(booklist)
    booklist = Book.objects.filter(press_id=Press.objects.get(pressaddress__contains="广西").id)
    print(booklist)